package com.wfs.jvm;

import java.lang.instrument.Instrumentation;

/**
 * @author: wfs
 * @Date: 2020/11/23 21:34
 * @Description:
 */
public class ObjectSizeAgent {
    private static Instrumentation inst;

    public static void premain(String agentArgs,Instrumentation _inst){
        inst=_inst;
    }
    public static long siteOf(Object o){
        return inst.getObjectSize(o);
    }
}
